<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@include file="../../WEB-INF/jspf/admin.jspf" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link href="../../jq/redmond/jquery-ui-1.10.3.custom.min.css" type="text/css" rel="stylesheet"/>
        <link href="../../css/main.css" type="text/css" rel="stylesheet"/>
        <link href="../../jq/menu/menu.css" type="text/css" rel="stylesheet"/>
        <link href="../../jq/menu/submenu.css" type="text/css" rel="stylesheet"/>
        <link href="../../jq/tree/dhtmlxtree.css" type="text/css" rel="stylesheet"/>

        <link href="../../parainfo/form/form.css" type="text/css" rel="stylesheet"/>
        <link href="../../parainfo/table/table.css" type="text/css" rel="stylesheet"/>

        <script src="../../jq/jquery-1.10.2.min.js" type="text/javascript"></script>
        <script src="../../jq/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
        <script src="../../jq/i18n/jquery.ui.datepicker-es.min.js" type="text/javascript"></script>
        <script src="../../jq/tree/dhtmlxcommon.js" type="text/javascript"></script>
        <script src="../../jq/tree/dhtmlxtree.js" type="text/javascript"></script>

        <script src="../../jq/menu/menu.js" type="text/javascript"></script>
        <script src="../../jq/menu/submenu.js" type="text/javascript"></script>

        <script src="../../parainfo/form/form.js" type="text/javascript"></script>
        <script src="../../parainfo/table/table.js" type="text/javascript"></script>
        <script src="js/trabajadores_jef.js" type="text/javascript"></script>
    </head>
    <body>
        <div id="ctop">
            <%@include file="../../WEB-INF/jspf/top.jspf" %>
        </div>

        <div id="m_menu">
            <%@include file="../../WEB-INF/jspf/menu.jspf" %>
        </div>

        <div id="cmenu2">
            <%@include file="../../WEB-INF/jspf/submenu.jspf" %>
        </div>

        <div id="cdata">
            <h2 style="text-align: center;margin-bottom: 20px;color: #3fa7c5">Listado de Jefes</h2>

            <form class="parainfo" action="#" style="margin: auto;display: table">
                <fieldset>
                    <legend>Filtro de Búsqueda</legend>

                    <table>
                        <tr>
                            <td>Año</td>
                            <td>
                                <select id="annio" onchange="jsannio();" style="width: 320px">
                                    <option value="0">Seleccione...</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Unid. Ejecutora</td>
                            <td>
                                <select id="uejecutora" onchange="jsuejecutora();" style="width: 320px">
                                    <option value="0">Seleccione...</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Corte</td>
                            <td>
                                <select id="corte" onchange="jscorte();" style="width: 320px">
                                    <option value="0">Seleccione...</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th colspan="2" style="text-align: center;padding: 20px">
                                <input type="button" onclick="jsQry();"
                                       value="Actualizar"/>
                            </th>
                        </tr>
                    </table>
                </fieldset>
            </form>

            <table style="margin: auto;margin-top: 20px;margin-bottom: 40px">
                <tr>
                    <td style="vertical-align: top">
                        <table class="parainfo" style="width: 700px">
                            <thead>
                                <tr>
                                    <td style="width: 30px">&nbsp;</td>
                                    <td></td>
                                    <td>Dependencia</td>
                                    <td>Jefe</td>
                                    <td>Fecha Inicio</td>
                                </tr>
                            </thead>

                            <tbody id="qbody">
                                <tr>
                                    <th><input type="radio"/></th>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <th><input type="radio"/></th>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <td colspan="5" id="qfoot" style="text-align: right;padding-right: 20px">&nbsp;</td>
                                </tr>
                            </tfoot>
                        </table>
                    </td>

                    <td style="vertical-align: top">
                        <table class="crud">
                            <tr>
                                <td>
                                    <a href="#" onclick="jsIns();" title="Nuevo">
                                        <img src="../../images/ins.png"/></a>
                                </td>
                                <td>
                                    <a href="#" onclick="jsCon();" title="Consultar">
                                        <img src="../../images/find2.png"/></a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#" onclick="jsExcel();" title="Exportar a Excel">
                                        <img src="../../images/excel.png"/></a>
                                </td>
                                <td>&nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>

            <%-- para INS  --%>
            <div style="display: none">
                <div id="dins" title="Asignar Jefe">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <table style="margin: auto">
                                    <tr>
                                        <td>Dependencia</td>
                                        <td>
                                            <input type="text" id="depe_ins" readonly="readonly"
                                                   maxlength="200" style="width: 300px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Fecha inicio</td>
                                        <td colspan="2">
                                            <input type="text" id="fecha_ins" readonly="readonly"
                                                   style="width: 100px;margin-right:4px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th colspan="2"><hr  style="color: #eaf4fd;height: 1px"></th>
                                    </tr>
                                    <tr>
                                        <th colspan="2" style="padding: 10px;color: #3fa7c5">
                                            Filtro de Búsqueda
                                        </th>
                                    </tr>
                                    <tr>
                                        <td>Nro Documento</td>
                                        <td>

                                            <input type="text" id="doc_ins" 
                                                   maxlength="15" style="width: 106px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Apellido&nbsp;Paterno</td>
                                        <td>
                                            <input type="text" id="appaterno_ins" 
                                                   maxlength="200" style="width: 300px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Apellido&nbsp;Materno</td>
                                        <td>
                                            <input type="text" id="apmaterno_ins" 
                                                   maxlength="200" style="width: 300px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Nombres</td>
                                        <td>
                                            <input type="text" id="nombres_ins" 
                                                   maxlength="200" style="width: 300px"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th colspan="2" style="text-align: center;padding: 10px">
                                            <input type="button" onclick="jsQry2();" value="Buscar"/>
                                        </th>
                                    </tr>
                                </table> 
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="height: 120px;overflow: auto;border-bottom: 1px solid #bbb">
                                    <table class="parainfo" style="width: 100%;font-size: .8em">
                                        <thead>
                                            <tr>
                                                <td style="width: 30px">&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>Trabajador</td>
                                                <td>Régimen</td>
                                                <td>Cargo</td>
                                                <td>Nro.&nbsp;Documento</td>
                                            </tr>
                                        </thead>

                                        <tbody id="qbody2">
                                            <tr>
                                                <th><input type="radio"/></th>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                            </tr>
                                            <tr>
                                                <th><input type="radio"/></th>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                    </table>

                    <p id="error_ins" style="color: red"></p>
                </div>
            </div>

            <%-- para consulta  --%>
            <div style="display: none">
                <div id="dcon" title="Consulta Jefe">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <table style="margin: auto;margin-bottom: 20px">
                                    <tr>
                                        <td>Dependencia</td>
                                        <td>
                                            <input type="text" id="depe_con" readonly="readonly"
                                                   maxlength="200" style="width: 300px"/>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="height: 100px;overflow: auto;border-bottom: 1px solid #bbb">
                                    <table class="parainfo" style="width: 100%;font-size: .8em">
                                        <thead>
                                            <tr>
                                                <td></td>
                                                <td>Fecha Inicio</td>
                                                <td>Jefe</td>
                                                <td>Estado</td>
                                            </tr>
                                        </thead>

                                        <tbody id="qbody3"></tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                    </table>

                    <p id="error_con" style="color: red"></p>
                </div>
            </div>

            <%-- para mensajes  --%>
            <div style="display: none">
                <div id="dmsg" title="Mensaje">
                    <p id="msg" style="text-align: center;color: #800;margin: 20px"></p>
                </div>
            </div>
        </div>

        <%-- para excel  --%>
        <form id="to_excel" action="TrabajadoresJefExc" target="_parent" method="post">
            <input type="hidden" id="data_excel" name="data_excel"/>

            <input type="hidden" id="anio_excel" name="anio_excel"/>
            <input type="hidden" id="ueje_excel" name="ueje_excel"/>
            <input type="hidden" id="cort_excel" name="cort_excel"/>
        </form>
    </body>
</html>

